﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Sublimation
{
    public class EnemyUnit2 : EnemyUnit
    {
        protected int NUMBER_OF_FRAMES_TO_PLAY = 4;
        protected const int FRAMES_PER_SECOND = 10;

        public EnemyUnit2(WorldProperties worldProperties)
            : base(worldProperties){
                kind = EnemyKind.Enemy2;
                scoreValue = 10;
                Life = 10;
                MaxSpeed = 80f;
                MeleeDamage = 20;
                MeleeAttackDelay = 1000;
            }
        protected override void LoadContent()
        {
            base.LoadContent();
            textureAnimator = new AnimatedSprite.AnimatedTexture(Origin, Rotation, Scale, 1.0f);
            textureAnimator.Load(Game.Content, "Sprites\\enemy2", NUMBER_OF_FRAMES_TO_PLAY, FRAMES_PER_SECOND);
            textureAttack = new AnimatedSprite.AnimatedTexture(Origin, Rotation, Scale, 1.0f);
            textureAttack.Load(Game.Content, "Sprites\\enemy2_attack", 6, FRAMES_PER_SECOND);
            Scale = 0.5f;
        }

        public override void Kill()
        {
            base.Kill();
            if (Life <= 0) new Animation(worldProperties, this, 0.8f, 4, 10, "Sprites\\enemy2_dying");
        }
    }
}
